package com.uff.hmstpa;

import com.uff.hmstpa.controller.ScheduleSystemController;
import com.uff.hmstpa.controller.impl.ScheduleSystemControllerImpl;
import com.uff.hmstpa.model.ScheduleSystemModel;
import com.uff.hmstpa.model.impl.ScheduleSystemModelImpl;
import com.uff.hmstpa.model.mediator.ModelMediator;
import com.uff.hmstpa.model.service.impl.AppointmentServiceImpl;
import com.uff.hmstpa.model.service.impl.CoverageServiceImpl;
import com.uff.hmstpa.model.service.impl.DoctorServiceImpl;
import com.uff.hmstpa.model.service.impl.PatientServiceImpl;
import com.uff.hmstpa.vision.ScheduleSystemView;
import com.uff.hmstpa.vision.impl.ScheduleSystemViewUI;

public class Main {

	public static void main(String[] args) {
		ScheduleSystemModel model = new ScheduleSystemModelImpl();
		ScheduleSystemView view = new ScheduleSystemViewUI(model);

		ScheduleSystemController controller = ScheduleSystemControllerImpl.instance();
		controller.setModel(model);
		controller.setView(view);		

		ModelMediator mediator = new ModelMediator();
		mediator.registerService(new AppointmentServiceImpl());
		mediator.registerService(new DoctorServiceImpl());
		mediator.registerService(new PatientServiceImpl());
		mediator.registerService(new CoverageServiceImpl());
		mediator.registerModel(model);
		mediator.loadModel();
		
	}
}
